type Dialog = ({ title, content, confirm, cancel, close }: { title?: string, content?: string, confirm?: Function, cancel?: Function, close?: Function }) => void

let currentFun: Dialog = () => { }
const reg = (fun: typeof currentFun) => {
    currentFun = fun
}
const unReg = () => {
    currentFun = () => { }
}
const dialog: Dialog = (obj) => {
    currentFun(obj)
}
export { dialog, reg, unReg }